import java.util.Arrays;
import java.util.Comparator;
import java.util.PriorityQueue;


public class test {
    public static void main(String[] args) {
        TestHeap testHeap = new TestHeap();
        int[] array = {10,4,2,6,15,24,9,0,4};
        int[] ret2 = testHeap.maxlestK(array,3);
        System.out.println(Arrays.toString(ret2));
        int[] ret3 = testHeap.smallestK(array,3);
        System.out.println(Arrays.toString(ret3));
    }
    public static void main3(String[] args) {
        PriorityQueue<Integer> priorityQueue = new PriorityQueue<>();
        priorityQueue.offer(10);
        priorityQueue.offer(5);
        priorityQueue.offer(9);
        priorityQueue.offer(7);
        priorityQueue.offer(77);
        System.out.println(priorityQueue.poll());
        System.out.println(priorityQueue.poll());
        System.out.println(priorityQueue.poll());
        System.out.println(priorityQueue.poll());
        System.out.println(priorityQueue.poll());

    }
    public static void main2(String[] args) {
        TestHeap testHeap = new TestHeap();
        int[] array = {27,15,19,18,28,34,65,49,25,37};
        testHeap.initHeap(array);
        testHeap.creatHeap();
        System.out.println();
        System.out.println("===插入元素===");
        //testHeap.offer(80);
        System.out.println("===删除元素===");
        int val = testHeap.poll();
        System.out.println(val);
    }
    public static void main1(String[] args) {
        BinaryTree binaryTree = new BinaryTree();
        BinaryTree.TreeNode root = binaryTree.createTree();
        System.out.println(binaryTree.find(root, 'A'));
        System.out.println(binaryTree.find(root, 'd'));
        System.out.println(binaryTree.isBalancedTree(root));
        System.out.println(binaryTree.isSymmetric(root));
    }
}
